package com.zhouyu.mybatis.demo;

import com.zhouyu.mybatis.demo.mapper.OrderMapper;
import com.zhouyu.mybatis.demo.mapper.UserMapper;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.IOException;

public class MyBaitsSpringDemo {
	public static void main(String[] args) throws IOException {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MyBaitsAppConfig.class);
		UserMapper userMapper = context.getBean(UserMapper.class);
		System.out.println(userMapper.query());
		OrderMapper orderMapper = context.getBean(OrderMapper.class);
		System.out.println(orderMapper.query());
	}
}
